import re
from UserInterface.InstructionSrc import InstructionSrc 
from UserInterface.UIException import *

class CLInstructionSrc(InstructionSrc):
    def __init__(self) -> None:
        super().__init__()

    def GetInstruction(self) -> tuple:
        instStr = input('# ')
        instStr = instStr.strip()
        if not instStr:
            raise UIBlankInput()
        return tuple(re.split(r'\s+', instStr))
